<?php
/**
 * Created by PhpStorm.
 * User: fengliu
 * Date: 15/8/9
 * Time: 下午8:49
 */
	//$post== file_get_contents('php://input', 'r');
	//if(empty($post))
	$post=var_export($_REQUEST,true);
    $size = strlen($post);
    $filename=date('YmdHis')."-".rand(1000,9999).".text";
    $fp2=@fopen($filename, 'a');
if (isset($_GET['token']) &&$_GET['token'] === md5(hainuo)) {
    echo "<pre>";
    exec("D:\\Git\\bin\\git.exe pull", $array2);
    $post .= "\n\r".var_export($array2, true);
    fwrite($fp2,$post);
    fclose($fp2);
} else {
    fwrite($fp2,'异常访问'.json_encode($_SEVER));
    fclose($fp2);
    header("location:/xxxx/");
}
